From: Roger Pau Monne Date: Fri, 8 Apr 2016 16:13:39 +0000 (+0200) Subject: libxl: remove code added to use the 'phy' backend with CDROM devices X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~1317 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:///%22http:/www.example.com/cgi/%22https:/?a=commitdiff_plain;h=1a92e6c4dee09f8e00a3e5fcfd01b4c6dd4d9323;p=xen.git libxl: remove code added to use the 'phy' backend with CDROM devices This is a partial revert of 612f15, that allowed CDROM devices to use the 'phy' PV backend. Due to limitations in the current implementation of the libxl_cdrom_insert function, the PV backend used in conjunction with an emulated CDROM device must always be Qdisk at the moment. This is due to libxl_cdrom_insert not running disk hotplug scripts on plug and unplug of PV CDROM backends (and possibly other yet to be identified issues). Signed-off-by: Roger Pau Monné Acked-by: Wei Liu --- diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c index dfdf860f84..a98707c8fc 100644 --- a/tools/libxl/libxl_device.c +++ b/tools/libxl/libxl_device.c @@ -191,20 +191,13 @@ static int disk_try_backend(disk_try_backend_args *a, switch (backend) { case LIBXL_DISK_BACKEND_PHY: - if (!(a->disk->format == LIBXL_DISK_FORMAT_RAW || - a->disk->format == LIBXL_DISK_FORMAT_EMPTY)) { + if (a->disk->format != LIBXL_DISK_FORMAT_RAW) { goto bad_format; } if (libxl_defbool_val(a->disk->colo_enable)) goto bad_colo; - if (a->disk->format == LIBXL_DISK_FORMAT_EMPTY) { - LOG(DEBUG, "Disk vdev=%s is empty, skipping physical device check", - a->disk->vdev); - return backend; - } - if (a->disk->backend_domid != LIBXL_TOOLSTACK_DOMID) { LOG(DEBUG, "Disk vdev=%s, is using a storage driver domain, " "skipping physical device check", a->disk->vdev);